import request from '@/utils/request'

export function getList(pageNo,pageSize,query) {
  return request({
    url: `/systemUser/findpage/${pageNo}/${pageSize}`,
    method: 'get',
    params: query
  })
}

export function getUserById(id) {
  return request({
    url: `/systemUser/find/${id}`,
    method: 'post',
  })
}

export function doAdd(data) {
  return request({
    url: '/systemUser/add',
    method: 'post',
    data,
  })
}

export function doEdit(data) {
  return request({
    url: '/systemUser/edit',
    method: 'put',
    data,
  })
}

export function doDelete(id) {
  return request({
    url: `/systemUser/del/${id}`,
    method: 'delete'
  })
}

// 获取全部角色
export function  getUserRoles(){
  return request({
    url:'/system/role/list',
    method: 'get'
  })
}
